function result = derouler(datas,baseTemps)
result = zeros(1,length(datas));
derivee = datas(2:end)-datas(1:end-1);
derivee(end+1) = 0;
figure();
plot(baseTemps,derivee);
title('derivee');
fenetre = 100;
seuil = 0.3;
result = datas(2:end)+result(1:end-1);
result(end+1)=result(end);
%for i =1:length(datas)-1
    %if derivee(i+1)<seuil
       % result(i)=datas(i)+datas(i+1);
    %else
        %result(i)=result(i+1);
   % end
%end
figure();
plot(baseTemps,result,'r');